package com.zhbr.mvp.model;

import com.zhbr.common.rx.RxUtil;
import com.zhbr.mvp.contract.HomeContract;
import com.zhbr.mvp.base.model.BaseModel;

import java.util.Map;

import rx.Subscriber;
import rx.Subscription;

import static com.zhbr.common.rx.RxUtil.applySchedulers;

public class HomeModel extends BaseModel implements HomeContract.Model {


    @Override
    public void getPqgdAll(int pageNum, int pageSize, Subscriber subscriber) {
        Subscription subscription;
        subscription=mApi.getAllOrder(pageNum,pageSize).compose(applySchedulers()).compose(RxUtil.handleResult()).subscribe(subscriber);
        addSubscribe(subscription);
    }
}
